package com.li.springbootproject.service.rabbitmq;

import com.li.springbootproject.config.rabbitmq.RabbitMqConst;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 8/13/2022 6:58 PM
 */
@Component
public class RabbitMqDequeTwoConsume {

    private static final Logger logger = LoggerFactory.getLogger(RabbitMqDequeTwoConsume.class);

    @RabbitListener(queues = RabbitMqConst.DEQUE_TWO)
    @RabbitHandler
    public void dequeTwoConsumeOne(Object message){
        logger.info("dequeTwo consume one message: " + message);
    }

    @RabbitListener(queues = RabbitMqConst.DEQUE_TWO)
    @RabbitHandler
    public void dequeTwoConsumeTwo(Object message){
        logger.info("dequeTwo consume two message: " + message);
    }

}
